﻿/*************************
Diese Software ist ein Beispiel (sample code) und unterliegt der Microsoft Public License. 
Die Verwendung des Codes ist unter den Bedingungen der Microsoft Public License erlaubt.
*************************
This software is sample code and is subject to the Microsoft Public License. 
You may use this code according to the conditions of the Microsoft Public License.
*************************/

using System;
using System.Collections.Generic;
using System.Text;

namespace Egora.Pvp
{
  public enum PvpHeader
  {
    X_Version = 0,
    X_AUTHENTICATE_participantId,
    X_AUTHENTICATE_gvOuDomain,
    X_AUTHENTICATE_UserID,
    X_AUTHENTICATE_cn,
    X_AUTHENTICATE_gvOuId,
    X_AUTHENTICATE_Ou,
    X_AUTHENTICATE_gvSecClass,
    X_AUTHENTICATE_mail,
    X_AUTHENTICATE_tel,
    X_AUTHENTICATE_gvGid,
    X_AUTHENTICATE_gvFunction,
    X_AUTHENTICATE_bpk,
    X_AUTHORIZE_gvOuId,
    X_AUTHORIZE_Ou,
    X_AUTHORIZE_roles,
    X_ACCOUNTING_InvoiceRecptId,
    X_ACCOUNTING_CostCenterId,
    X_ACCOUNTING_ChargeCode,
    X_PVP_TXID,
    X_PVP_Log_Level,
    X_ORIG_SCHEME,
    X_ORIG_HOSTINFO,
    X_ORIG_URI,
  };

  public enum AuthenticatePvpHeader
  {
    X_AUTHENTICATE_participantId = 1,
    X_AUTHENTICATE_gvOuDomain,
    X_AUTHENTICATE_UserID,
    X_AUTHENTICATE_cn,
    X_AUTHENTICATE_gvOuId,
    X_AUTHENTICATE_Ou,
    X_AUTHENTICATE_gvSecClass,
    X_AUTHENTICATE_mail,
    X_AUTHENTICATE_tel,
    X_AUTHENTICATE_gvGid,
    X_AUTHENTICATE_gvFunction,
    X_AUTHENTICATE_bpk,
  };

  public class PvpHeaderNames
  {
    public static List<string> AllHeaders = new List<string>()
                                              {
                                                "X-Version",
                                                "X-AUTHENTICATE-participantId",
                                                "X-AUTHENTICATE-gvOuDomain",
                                                "X-AUTHENTICATE-UserID",
                                                "X-AUTHENTICATE-cn",
                                                "X-AUTHENTICATE-gvOuId",
                                                "X-AUTHENTICATE-Ou",
                                                "X-AUTHENTICATE-gvSecClass",
                                                "X-AUTHENTICATE-mail",
                                                "X-AUTHENTICATE-tel",
                                                "X-AUTHENTICATE-gvGid",
                                                "X-AUTHENTICATE-gvFunction",
                                                "X-AUTHENTICATE-bpk",
                                                "X-AUTHORIZE-gvOuId",
                                                "X-AUTHORIZE-Ou",
                                                "X-AUTHORIZE-roles",
                                                "X-ACCOUNTING-InvoiceRecptId",
                                                "X-ACCOUNTING-CostCenterId",
                                                "X-ACCOUNTING-ChargeCode",
                                                "X-PVP-TXID",
                                                "X-PVP-Log-Level",
                                                "X-ORIG-SCHEME",
                                                "X-ORIG-HOSTINFO",
                                                "X-ORIG-URI",
                                              };
    public static string GetHeaderName(PvpHeader header)
    {
      return AllHeaders[(int) header];
    }

    public static string GetHeaderName(AuthenticatePvpHeader header)
    {
      return AllHeaders[(int)header];
    }
  }
}